//
//  BaseButton.m
//  UILbrary
//
//  Created by mac on 16/7/19.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "BaseButton.h"

@implementation BaseButton

- (void)setIsTopImageBottomTitle:(BOOL)isTopImageBottomTitle{
    if (isTopImageBottomTitle) {
        /** --------设置上图瞎字---------**/
        
        CGSize imageSize = self.imageView.frame.size;
        CGSize titleSize = self.titleLabel.frame.size;
        //http://www.jianshu.com/p/778aac34926a
        self.imageEdgeInsets = UIEdgeInsetsMake(- titleSize.height, 0.0, 0.0, - titleSize.width);
        self.titleEdgeInsets = UIEdgeInsetsMake(0, - imageSize.width,  - imageSize.height, 0);
    }
}
@end
